import { notice, warn_level, warn_source, warn_type } from '@/plugins/mate.js'
export const formConfig = [
    {
        name: 'scope_id_list',
        type: 'cascader',
        placeholder: '筛选范围',
        options: [],
        options: [],
    },
    {
        name: 'device_name',
        type: 'input',
        placeholder: '设备名称',
    },
    {
        name: 'warn_level',
        type: 'select',
        placeholder: '告警等级',
        options: warn_level.options,
    },
    {
        name: 'start_time',
        type: 'date',
        placeholder: '开始时间',
    },
    {
        name: 'end_time',
        type: 'date',
        placeholder: '结束时间',
    },
]
export const colors = warn_level.color
export const column = [
    {
        label: '设备名称',
        name: 'device_name',
    },
    {
        label: '告警等级',
        width: '140',
        name: 'max_warn_level',
        format: (val) => warn_level.dirc[val],
        color: (val) => warn_level.color[val],
    },
    {
        label: '处理状态',
        name: 'notice',
        format: (val) => notice.dirc[val],
        color: (val) => notice.color[val],
    },
    {
        label: '开始时间',
        name: 'start_time',
        width: '200',
    },
    {
        label: '最后报警',
        name: 'end_time',
        width: '200',
    },
    {
        label: '告警次数',
        name: 'warn_count',
        width: '100',
    },
    {
        title: '操作',
        name: 'action',
        width: '220',
        buttons: [
            {
                text: '查看',
                click: (val) => {},
                click: (val) => {},
            },
        ],
    },
]
// 设备
export const column_1 = [
    {
        label: '测点名称',
        name: 'sensor_name',
    },
    // {
    //     label: '告警标题',
    //     name: 'title',
    // },
    {
        label: '模型类型',
        name: 'm_type',
    },
    // {
    //     label: '模型大类',
    //     name: 'm_d',
    // },
    // {
    //     label: '模型小类',
    //     name: 'm_m',
    // },
    {
        label: '告警内容',
        name: 'content',
        width: '300',
    },
    {
        label: '告警等级',
        name: 'warn_level',
        format: (val) => warn_level.dirc[val],
        color: (val) => warn_level.color[val],
        width: '100',
    },
    {
        label: '初始告警',
        name: 'create_time',
        width: '180',
    },
    {
        label: '最新告警',
        name: 'pred_time',
        width: '180',
    },
    {
        label: '告警值',
        name: 'pred_data',
        width: '80',
    },
    {
        label: '参数配置',
        name: 'm_config',
        width: '120',
    },
    {
        title: '操作',
        name: 'action',
        width: '260',
        buttons: [],
    },
]
//工单 生成配置
export const config1 = [
    {
        name: '',
        type: 'input',
    },
    {
        name: '',
    },
]

export const suggestSpan = ['', '持续关注', '观察数据历史趋势', '请尽快现场排查']
